/**
 * This Enum wraps up a ButtonType.
 * 
 * @author (Dilyan GEORGIEV)
 * @author (Thomas KOBER)
 * @author (Matthew MCDONALD)
 * 
 * @version (1.0)
 */
public enum ButtonType  
{
    /**
     * Difficulty Button.
     */
    DIFFICULTY(0),
    
    /**
     * Yes Button.
     */
    YES(1),
    
    /**
     * No Button.
     */
    NO(2),
    
    /**
     * Empty Button Type.
     */
    NONE(3);
    
    private int value;
    
    ButtonType(int value)
    {
        this.value = value;
    }
    
    /**
     * Returns the value associated with the ButtonType.
     * @return the value associated with the ButtonType.
     */
    public int getValue()
    {
        return this.value;
    }
    
    /**
     * Returns the ButtonType for a given value.
     * @param value the value for which to get the ButtonType.
     * @return the ButtonType for a given value.
     */
    public static ButtonType ButtonTypeForValue(int value)
    {
        ButtonType t = NONE;
        
        switch (value) {
        
            case 0: 
                t = DIFFICULTY;
                break;
                
            case 1:
                t = YES;
                break;
                
            case 2:
                t = NO;
                break;
                
            default:
                t = NONE;
                break;
        }
        
        return t;
    }
}
